//
//  RiLiViewController.m
//  Yearly Plan
//
//  Created by admin on 2019/2/28.
//  Copyright © 2019年 admin. All rights reserved.
//

#import "RiLiViewController.h"
#import "FDCalendar.h"
@interface RiLiViewController ()<UITableViewDelegate, UITableViewDataSource>

@end

@implementation RiLiViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"Calendar";
    
    FDCalendar *calendar = [[FDCalendar alloc] initWithCurrentDate:[NSDate date]];
    CGRect frame = calendar.frame;
    frame.origin.y = TOPBAR_HEIGHT;
    calendar.frame = frame;
    [self.view addSubview:calendar];
    
    NSLog(@"%lf", frame.size.height);
    
//    UILabel *lab = [UILabel new];
//    lab.text = @"No incident";
//    lab.font = FONT_SIZE(15);
//    lab.textColor = [UIColor darkGrayColor];
//    [self.view addSubview:lab];
//    [lab mas_makeConstraints:^(MASConstraintMaker *make) {
//        make.bottom.equalTo(self.view).offset(kHeight(-50));
//        make.centerX.equalTo(self.view);
//    }];
    
    UITableView *tableView = [[UITableView alloc]initWithFrame:CGRectZero style:UITableViewStylePlain];
    tableView.backgroundColor = [UIColor whiteColor];
    tableView.dataSource = self;
    tableView.delegate = self;
    tableView.tableFooterView = [UIView new];
    [self.view addSubview:tableView];
    [tableView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.view).offset(frame.size.height+TOPBAR_HEIGHT);
        make.left.bottom.right.equalTo(self.view);
    }];
}

-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section  {
    return 3;
}

-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
    return kHeight(45);
}

-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    UITableViewCell *cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@""];
    switch (indexPath.row) {
        case 0:
            cell.textLabel.text = @"Event Time";
            cell.detailTextLabel.text = @"none";
            break;
        case 1:
            cell.textLabel.text = @"Event Name";
            cell.detailTextLabel.text = @"none";
            break;
        case 2:
            cell.textLabel.text = @"Event Content";
            cell.detailTextLabel.text = @"none";
            break;
        default:
            break;
    }
    return cell;
}



@end
